package com.fintecher.service.serviceImpl;

import com.fintecher.dao.IBuyersDao;
import com.fintecher.pojo.Buyers;
import com.fintecher.service.IBuyersService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("buyersService")
public class BuyersServiceImpl implements IBuyersService {
	@Resource
	private IBuyersDao buyersDao;
	//通过Id获取用户对象
	@Override
	public Buyers getBuyersById(int buyerId) {
		// TODO Auto-generated method stub
		return this.buyersDao.selectByPrimaryKey(buyerId);
	}

	//通过买方市场的产品编号来获取该产品
	@Override
	public Buyers getBuyersByProduct_code(String product_code){
		return  this.buyersDao.getBuyersByProduct_code(product_code);
	}

	//获取买方市场的产品列表
	@Override
	public  List<Buyers> getBuyersList(){

		return this.buyersDao.getBuyersList();
	}
}
